package com.starry.FilterStudy;

import javax.servlet.*;
import java.io.IOException;

public class Filter1 implements Filter {
    public void init(FilterConfig config) throws ServletException {
    }

    public void destroy() {
    }

    @Override
    public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws ServletException, IOException {
        if (false) {
            request.getRequestDispatcher("/userlogin.jsp").forward(request, response);
        } else {
            chain.doFilter(request, response);
        }
    }
}
